package com.example.demo.dao;

import com.example.demo.bean.Warehouse;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface WarehouseDao {

    /*查询*/
    @Select("select * from warehouse where w_id = #{w_id}")
    List<Warehouse> warehouse(int id);

    /*新增*/
    @Insert("insert into warehouse (warehouse,Shelf) values(#{warehouse},#{Shelf})")
    void insert(Warehouse warehouse);

    /*删除*/
    @Delete("delete from warehouse where id=#{id}")
    void delete(int id);

    /*修改*/
    @Update("update warehouse set  warehouse = #{warehouse} where w_id = #{w_id}")
    void update(Warehouse warehouse);
}
